package middol.upload.impl

import groovy.transform.CompileStatic
import middol.result.Result
import middol.upload.IFileInfo
import middol.upload.IUploadHandler
import middol.upload.utils.LocalUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component

/**
* @Description:    本地文件上传
* @Author:         zhangjiayu@middol.com
* @CreateDate:     2020/10/22 9:35
* @Version:        1.0
*/
@Component
@CompileStatic
class LocalUploadHandler implements IUploadHandler {
    static final String name = "Local"
    @Autowired
    LocalUtils localUtils

    @Override
    List<Result> handleUpload(IFileInfo fileInfo) {
        localUtils.multiUpload(fileInfo)
    }
}
